Developer Documentation
PATH  Mac OS X Documentation > Developer Tools > Mac OS X Assembler Guide


Previous | Contents | Next

Registers

Many instructions accept registers as operands. The available registers are listed in this section. The Mac OS X assembler for Intel processors always uses names beginning with a percent sign (`%') for registers, so naming conflicts with identifiers aren't possible; further, all register names are in lowercase letters.

General Registers

Each of the 32-bit general registers of the i386 architecture are accessible by different names, which specify parts of that register to be used. For example, the AX register can be accessed as a single byte (%ah or %al), a 16-bit value (%ax), or a 32-bit value (%eax). The figure below shows the names of these registers and their relation to the full 32-bit storage for each register:

Floating-Point Registers

 

Register
 

%st

 

%st(0) - %st(7)

 

Segment Registers

 

Register
Description

%cs

code segment register

%ss

stack segment register

%ds

data segment register

%es

data segment register (string operation destination segment)

%fs

data segment register

%gs

data segment register

Other Registers

 

Register
Description

%cr0 - %cr3

control registers

%db0 - %db7

debug registers

%tr3 - %tr7

test registers


Mac OS X Assembler Reference: i386 Addressing Modes and Assembler Instructions

Previous | Contents | Next